<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<base href="<%=basePath%>">

		<title>机票界面</title>
		<link rel="stylesheet" type="text/css"
			href="<%=basePath%>jslib/bootstrap/css/bootstrap.css">
		<link rel="stylesheet" type="text/css"
			href="<%=basePath%>css/theme.css">
		<link rel="stylesheet"
			href="<%=basePath%>jslib/font-awesome/css/font-awesome.css">
		<script src="<%=basePath%>jslib/jquery-1.7.2.min.js"
			type="text/javascript"></script>

	</head>

	<body class="content1">
	<div class="row-fluid">
		<div class="span12">
			<img alt="" src="images/logo.jpg" />
			<a href="product/list">返回首页</a>
		</div>
	</div>
	<div class="row-fluid">
		<div class="span2">
			<div class="alert">
				 <button type="button" class="close" data-dismiss="alert">×</button>
				<h4>
					提示!
				</h4> <strong>警告!</strong> 请实名认证，一个用户只能买一张票.
			</div>
		</div>
		<div class="span6">
			 <table class="table table-hover table-bordered">
				<thead>
					<tr>
						        <th>
									机票类型
								</th>
								<th>
									票价
								</th>
								<th>
									票数
								</th>
								
								<th style="width: 90px;">
									操作
								</th>
					</tr>
				</thead>
				<tbody>
					<c:forEach items="${list}" var="item">
								<tr class="info">
									<td>
										${item.productname}
									</td>
									<td>
										${item.productprice}
									</td>
									<td>
										${item.cartnum}
									</td>
									
									<td>
										 <a href="<%=basePath%>refund?cartid=${item.cartid}">退票</a>
									</td>
								</tr>
							</c:forEach>
				</tbody>
				<c:set value="0" var="totalPrice"></c:set>
					<c:forEach items="${cartlist}" var="item1">
						<c:set value="${sum + item1.tprice}" var="sum"></c:set>
					</c:forEach>
			</table>
		</div>
		<div class="span4">
				<img alt="" src="images/3.jpg" />
		</div>
	</div>
</body>
</html>
